using SqlSugar;
using System;

namespace B.S.XZYData.Domain.LJC
{
    /// <summary>
    /// 工单-工序计划
    /// </summary>
    [SugarTable("wo_proc")]
    public class WorkOrderProcessModel
    {
        /// <summary>
        /// 主键 ID
        /// </summary>
        [SugarColumn(ColumnName = "id", IsPrimaryKey = true, IsIdentity = true)]
        public int Id { get; set; }

        /// <summary>
        /// 所属工单 ID
        /// </summary>
        [SugarColumn(ColumnName = "wo_id", IsNullable = false)]
        public int WorkOrderId { get; set; }

        /// <summary>
        /// 顺序号
        /// </summary>
        [SugarColumn(ColumnName = "seq", IsNullable = false)]
        public int Sequence { get; set; }

        /// <summary>
        /// 工序编号
        /// </summary>
        [SugarColumn(ColumnName = "p_code", Length = 30, IsNullable = false)]
        public string ProcessCode { get; set; }

        /// <summary>
        /// 工序名称
        /// </summary>
        [SugarColumn(ColumnName = "p_name", Length = 100, IsNullable = false)]
        public string ProcessName { get; set; }

        /// <summary>
        /// 计划数量
        /// </summary>
        [SugarColumn(ColumnName = "qty_pl")]
        public int? PlannedQuantity { get; set; }

        /// <summary>
        /// 已报工数
        /// </summary>
        [SugarColumn(ColumnName = "qty_rpt")]
        public int? ReportedQuantity { get; set; }

        /// <summary>
        /// 良品数
        /// </summary>
        [SugarColumn(ColumnName = "good")]
        public int? GoodQuantity { get; set; }

        /// <summary>
        /// 不良品数
        /// </summary>
        [SugarColumn(ColumnName = "bad")]
        public int? BadQuantity { get; set; }

        /// <summary>
        /// 报工配比
        /// </summary>
        [SugarColumn(ColumnName = "ratio", DecimalDigits = 2)]
        public decimal? Ratio { get; set; }

        /// <summary>
        /// 计划开始时间
        /// </summary>
        [SugarColumn(ColumnName = "t_s_pl", IsNullable = true)]
        public DateTime? PlannedStartTime { get; set; }

        /// <summary>
        /// 计划结束时间
        /// </summary>
        [SugarColumn(ColumnName = "t_e_pl", IsNullable = true)]
        public DateTime? PlannedEndTime { get; set; }

        /// <summary>
        /// 实际开始时间
        /// </summary>
        [SugarColumn(ColumnName = "t_s_ac", IsNullable = true)]
        public DateTime? ActualStartTime { get; set; }

        /// <summary>
        /// 实际结束时间
        /// </summary>
        [SugarColumn(ColumnName = "t_e_ac", IsNullable = true)]
        public DateTime? ActualEndTime { get; set; }

        /// <summary>
        /// 状态
        /// </summary>
        [SugarColumn(ColumnName = "stat", Length = 20)]
        public string? Status { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [SugarColumn(ColumnName = "c_tm")]
        public DateTime? CreateTime { get; set; }

        /// <summary>
        /// 修改时间
        /// </summary>
        [SugarColumn(ColumnName = "u_tm")]
        public DateTime? UpdateTime { get; set; }
    }
} 